# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>

pkgname=patchutils
pkgver=0.3.3
pkgrel=2
pkgdesc="Utilities to work with patches"
arch=('i686' 'x86_64')
url="http://cyberelk.net/tim/software/patchutils/"
license=('GPL')
groups=('base-devel')
depends=('msys2-runtime')
makedepend=('msys2-runtime-devel')
source=(http://cyberelk.net/tim/data/patchutils/stable/${pkgname}-${pkgver}.tar.xz)
sha256sums=('91f4e8451b2efcac5d40c966e42c175803450f0de94c926bfecc12c90070ad3c')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}

  autoreconf -fi
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure \
    --build=${CHOST} \
    --host=${CHOST} \
    --target=${CHOST} \
    --prefix=/usr

  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=$pkgdir install
}
